-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref(insights): rename resource module to asset module #70951
Conversation
Bundle ReportChanges will increase total bundle size by 6.09kB ⬆️
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #70951 +/- ##
===========================================
+ Coverage 64.59% 77.90% +13.31%
===========================================
Files 6520 6548 +28
Lines 291600 291902 +302
Branches 50418 50424 +6
===========================================
+ Hits 188350 227420 +39070
+ Misses 96767 58232 -38535
+ Partials 6483 6250 -233
|
export const BASE_URL = 'browser/resources'; | ||
export const DATA_TYPE = t('Asset'); // Name of the data shown (singular) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had trouble finding a decent name for this, but its a variable that represents the singular version of the type of data on the page. It maps to the span, i.e were showing Asset
spans in this module
static/app/routes.tsx
Outdated
<Route path={`${PERFORMANCE_MODULE_BASE_URLS[ModuleName.RESOURCE]}/`}> | ||
<IndexRoute | ||
component={make( | ||
() => import('sentry/views/performance/browser/resources/index') | ||
)} | ||
/> | ||
<Route | ||
path="spans/span/:groupId/" | ||
component={make( | ||
() => | ||
import( | ||
'sentry/views/performance/browser/resources/resourceSummaryPage/index' | ||
) | ||
)} | ||
/> | ||
</Route> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/browser/assets
and /browser/resources
will just route to the same component so we don't have to rely on the organization to setup routes
export const PERFORMANCE_MODULE_TITLE = t('Resources'); | ||
export const PERFORMANCE_BASE_URL = 'browser/resources'; | ||
export const PERFORMANCE_DATA_TYPE = t('Resource'); | ||
export const PERFORMANCE_MODULE_DESCRIPTION = t( | ||
'Find large and slow-to-load resources used by your application and understand their impact on page performance.' | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefixed with Performance
so that once we move to insights, we just delete these and it all makes sense still. If we prefixed with insights, we would either have to live with it, or refactor this variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense! Two nits on confusing conditionals, otherwise LGTM!
Co-authored-by: George Gritsouk <[email protected]>
Renaming the
resources
module toassets
resonates better with FE devs. This does all the renaming in sentry itself, and there's another PR up for docs getsentry/sentry-docs#10047